package com.hue.springbootaop.controller;

import com.hue.springbootaop.annotation.MethodReport;
import com.hue.springbootaop.domain.User;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: 姚凤桥
 * @Date: 2022/4/15 11:48
 * @Description:
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @MethodReport
    @RequestMapping("/m1")
    public String m1(@RequestParam("name") String name) {
        return "m1";
    }

    @MethodReport
    @PostMapping("/m2")
    public String m2(@RequestBody User user) {
        System.out.println("name:" + user.getName() + ",age:" + user.getAge());
        return "m2";
    }
}
